package com.yuyou.fn.educational.service;

import com.github.wens.mybatisplus.plugins.Page;
import com.yuyou.fn.educational.entity.StudentReg;
import com.github.wens.framework.service.ISuperService;
import com.yuyou.fn.educational.vo.*;

import java.math.BigDecimal;
import java.util.List;

/**
 * @author Terry
 *         StudentReg 表数据服务层接口
 */
public interface IStudentRegService extends ISuperService<StudentReg, Long> {



    List<StudentReg> findStudentRegQuery(StudentRegQueryVo studentRegQueryVo);


    List<StudentReg> findStudentRegByCourseOrderId(Long courseOrderId);


    /**
     *
     * @param courseOrderId
     * @param payableAmount 订单应付金额
     * @param paidAmount 已经支付金额
     * @param chargingStatus 支付状态
     */
    void changeStudentRegCharging(Long courseOrderId,BigDecimal payableAmount , BigDecimal paidAmount, Integer chargingStatus);

    TurnClassVo courseClassDetail(Long regId);

    void changeClass(ChooseClassVo chooseClassVo);

    /**
     * 修改注册状态
     */
    void changeRegStatus(Long regId, Integer regStatus);

    RefundApplyVo refundApplyMessage(Long regId);


    Page<StudentReg> findStudentRegByQuery(StudentRegQueryVo studentRegQueryVo, int pageNo, int pageSize);

    boolean hadReg(Long classId, Long studentId);

    void changeRefundStatus(Long regId, int status);

    void saveStudentReg(List<StudentReg> studentRegList);
    /*得到学生拥有的课程id列表*/
    List<StudentReg> findStudentClassIds(Long studentId,List<String> regStatus);

    /*得到学生拥有的课程id列表*/
    List<StudentReg> findStudentRegByStudentIds(List<Long> studentIdList,List<String> regStatusList);


}